﻿namespace Borg.AddOn
{
    internal sealed class GarbageCollectorApiHookChain : IGarbageCollectorApiHook
    {
        private readonly IGarbageCollectorApiHook[] _hooks;

        public GarbageCollectorApiHookChain(IGarbageCollectorApiHook[] hooks)
        {
            _hooks = hooks;
        }

        public void OnSetProperty(GarbageCollectorOperation operation)
        {
            foreach (IGarbageCollectorApiHook hook in _hooks)
                hook.OnSetProperty(operation);
        }
    }
}

